#define _CRT_SECURE_NO_WARNINGS 1

#include "stack.h"
#include "queue.h"

void test_stack()
{
	Stack stack;
	StackInit(&stack);
	StackPush(&stack, 1);
	StackPush(&stack, 2);
	StackPush(&stack, 3);
	StackPush(&stack, 4);
	StackPush(&stack, 5);
	StackPop(&stack);
	STDataType ret = StackTop(&stack);
	printf("ret = %d\n", ret);
	int size = StackSize(&stack);
	printf("size = %d\n", size);
	bool empty = StackEmpty(&stack);
	StackDestroy(&stack);

}

void test_queue()
{
	Queue queue;
	QueueInit(&queue);
	int empty = QueueEmpty(&queue);
	printf("empty = %d\n", empty);
	QueuePush(&queue, 1);
	int size = QueueSize(&queue);
	int front = QueueFront(&queue);
	printf("size = %d\n", size);
	QueuePush(&queue, 2);
	size = QueueSize(&queue);
	printf("size = %d\n", size);
	QueuePush(&queue, 3);
	size = QueueSize(&queue);
	printf("size = %d\n", size);
	QueuePush(&queue, 4);
	size = QueueSize(&queue);
	printf("size = %d\n", size);
	QueuePush(&queue, 5);
	size = QueueSize(&queue);
	printf("size = %d\n", size);
	int back = QueueBack(&queue);
	QueuePop(&queue);
	front = QueueFront(&queue);
	size = QueueSize(&queue);
	empty = QueueEmpty(&queue);
	QueueDestroy(&queue);
	printf("size = %d\n", size);
}

int main()
{
	test_stack();
	return 0;
}